package com.wlient.basic.EnumCollection;

import lombok.Getter;

import java.util.Arrays;
import java.util.EnumMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

@Getter
public enum QaStatusEnum {
    /**
     * 在制品
     */
    WORK_IN_PROCESS(1, "在制品"),
    /**
     * 待检品
     */
    QA_PREPARE(2, "待检品"),
    /**
     * 合格品
     */
    QUALIFIED(3, "合格品"),
    /**
     * 废品
     */
    UNQUALIFIED(4, "废品");


    private Integer key;
    private String value;

    QaStatusEnum(Integer key, String value) {
        this.key = key;
        this.value = value;
    }

    public EnumMap<QaStatusEnum, String> QaStatusEnumMap() {
        EnumMap<QaStatusEnum, String> map = new EnumMap<>(QaStatusEnum.class);
        map.put(QaStatusEnum.WORK_IN_PROCESS, QaStatusEnum.WORK_IN_PROCESS.getValue());
        map.put(QaStatusEnum.QA_PREPARE, QaStatusEnum.QA_PREPARE.getValue());
        map.put(QaStatusEnum.QUALIFIED, QaStatusEnum.QUALIFIED.getValue());
        map.put(QaStatusEnum.UNQUALIFIED, QaStatusEnum.UNQUALIFIED.getValue());
        return map;
    }

    public final static List<Integer> list = Arrays.asList(WORK_IN_PROCESS.getKey(),QA_PREPARE.getKey(),QUALIFIED.getKey(),UNQUALIFIED.getKey());


}